/****************************************************************************\
 * @file    game_math.c
 * @author  马新硕
 * @date    2022/09/20
 * @brief   游戏内用到的数学计算
 * @note    
 ******************************************************************************
 * @attent  
 ****************************************************************************/
#ifndef _H_GAME_MATH
#define _H_GAME_MATH
#include "stdint.h"

uint16_t min(uint16_t a, uint16_t b);
uint16_t straight_distance(uint16_t ax, uint16_t ay, uint16_t bx, uint16_t by);
void vector_calculation(float* vector, uint16_t ax, uint16_t ay, uint16_t bx, uint16_t by);
float vector_costheta(float* vector1, float* vector2);
float vector_dot_product(float* vector1, float* vector2);
void randomNum(uint8_t *num);
int16_t roundNum(float num);
  
#endif
